package com.witmore.skyline.db.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.witmore.skyline.db.entity.MessageDO;
import com.witmore.skyline.db.dto.MessageWithPicDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 消息表 Mapper 接口
 * </p>
 *
 * @author 豆子高
 * @since 2025-05-06
 */
@Mapper
public interface MessageMapper extends BaseMapper<MessageDO> {

    /**
     * 分页查询消息列表（包含图片地址）
     */
    Page<MessageWithPicDTO> selectMessagePageWithPicUrl(Page<MessageWithPicDTO> page, @Param("orgId") Integer orgId,
                                                        @Param("messageType") Integer messageType,
                                                        @Param("messageStatus") Integer messageStatus,
                                                        @Param("deviceSn") String deviceSn,
                                                        @Param("cameraSn") String cameraSn);

}
